unit EditPosition;

interface

uses
  Winapi.Windows, Winapi.Messages, SysUtils, Variants, Classes, Graphics,
  Controls, Forms, Dialogs, uniGUITypes, uniGUIAbstractClasses,
  uniGUIClasses, uniGUIForm, DB, DBClient, ClientRowSet, uniEdit, uniDBEdit,
  uniLabel, jpeg, uniImage, uniGUIBaseClasses, uniButton, uniBitBtn, uniMemo,
  uniDBMemo, uniMultiItem, uniComboBox, uniDBComboBox, uniDBLookupComboBox;

type
  TFrmEditPosition = class(TUniForm)
    dsCabinet: TDataSource;
    dsNode: TDataSource;
    crsCabinet: TClientRowSet;
    crsCabinetID: TStringField;
    crsCabinetCABINET_NO: TStringField;
    crsCabinetCABINET_SUB_NO: TIntegerField;
    crsCabinetCABINET_SUB_TYPE: TIntegerField;
    crsCabinetGROUP_CODE: TStringField;
    crsCabinetAREA_NAME: TStringField;
    crsCabinetNODE_NO: TStringField;
    crsCabinetNODE_NAME: TStringField;
    crsCabinetSYS_ACCOUNT: TStringField;
    crsCabinetSTATUS: TIntegerField;
    crsCabinetUPDATETIME: TStringField;
    crsCabinetVERSION: TIntegerField;
    crsCabinetREMARK: TStringField;
    crsCabinetCON_MOBILE: TStringField;
    crsCabinetACCEPT_TIME: TStringField;
    crsCabinetOLD_STATUS: TIntegerField;
    crsCabinetGET_PWD: TStringField;
    crsCabinetBILL_ID: TStringField;
    crsCabinetBILL_NO: TStringField;
    crsCabinetSUB_NO_MACHINE: TIntegerField;
    btSave: TUniBitBtn;
    btClose: TUniBitBtn;
    UniImage8: TUniImage;
    lbCaption: TUniLabel;
    UniLabel6: TUniLabel;
    edCabNo: TUniDBEdit;
    UniLabel1: TUniLabel;
    edBoxNo: TUniDBEdit;
    UniLabel2: TUniLabel;
    edArea: TUniDBEdit;
    UniLabel4: TUniLabel;
    edRemark: TUniDBMemo;
    cbNode: TUniDBLookupComboBox;
    UniLabel3: TUniLabel;
    procedure btSaveClick(Sender: TObject);
    procedure btCloseClick(Sender: TObject);
    procedure UniFormShow(Sender: TObject);
    procedure UniFormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

function FrmEditPosition: TFrmEditPosition;

implementation

{$R *.dfm}

uses
  MainModule, uniGUIApplication, DictModule, ExpModule, uCommFunction;

function FrmEditPosition: TFrmEditPosition;
begin
  Result := TFrmEditPosition(UniMainModule.GetFormInstance(TFrmEditPosition));
end;

procedure TFrmEditPosition.btCloseClick(Sender: TObject);
begin
  TClientRowSet(dsCabinet.DataSet).CancelUpdates;
  self.Close;
end;

procedure TFrmEditPosition.btSaveClick(Sender: TObject);
begin
  TClientRowSet(dsCabinet.DataSet).ApplyUpdates;
  self.Close;
end;

procedure TFrmEditPosition.UniFormCreate(Sender: TObject);
begin
  SetCompoentLanguage(Self);
end;

procedure TFrmEditPosition.UniFormShow(Sender: TObject);
begin
  cbNode.Enabled := dmexpress.UserInfo.IsCenter;
end;

end.
